home *** CD-ROM | disk | FTP | other *** search
- *********************************************************
- * *
- * A very short window demonstration *
- * *
- *********************************************************
-
- include releasem.s release unused memory
- include getpar.s find where the parameters sent to the program are
- move.l a0,parbuf save the address
-
- bra main
- include gemmacro.i this one is supplied with devpac
- include shrtones.s
- include window.s
- include winevent.s
-
-
- wtype equ %01011 info, move, full, close and name
- windowname dc.b 'hello world',0
-
- main move #32,xstart window start position
- move #50,ystart
- move #380,xwidth window size
- move #150,ywidth
- bsr @createwindow
-
- lea rsrc,a0
- bra @dowindowevents ;this routine will take care of all the common events
-
- buttonevent cmp #1,d0 was my button pressed?
- beq button1 yes!
- rts
- button1 form_alert alertbutton,#alerttext
- rts
-
- closeevent bsr @exitwindow
- bra @quit
-
-
-
- rsrc dc.w -1,1,1,20,0,0,4,1,0,0,380,150
- dc.w 0,-1,-1,26,1,0
- dc.l buttontext
- dc.w 50,50,100,16
-
- alertbutton dc.w 1
- alerttext dc.b '[2][You have not saved anything|are you sure you want to quit?][ Yes ]',0
- buttontext dc.b 'a button',0
-
- include aeslib.s supplied with devpac
- include vdilib.s supplied with devpac
-
- section bss
-
- parbuf ds.l 1
-
-
-